<%--
  Created by IntelliJ IDEA.
  User: Y&Y
  Date: 6/9 0009
  Time: 15:05
  To change this template use File | Settings | File Templates.
--%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>借阅展示</title>
    <!-- 引入 Bootstrap -->
    <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
</head>

<body>

<%-- boostrap主容器 --%>
<div class="container">

    <%-- 页面标题 --%>
    <div class="row clearfix">
        <div class="col-md-12 column">
            <div class="page-header">
                <h1>借阅列表(显示所有记录)</h1>
            </div>
        </div>
    </div>
    <%-- 页面标题 --%>

    <div class="row">
        <div class="col-md-4 column">
            <a class="btn btn-primary" href="${pageContext.request.contextPath}/loan/toAddLoan">添加记录</a>
        </div>
    </div>

    <%-- 表格展示区域 --%>
    <div class="row clearfix">
        <div class="col-md-12 column">
            <table class="table table-hover table-striped">

                <%-- 表头 --%>
                <thead>
                <tr>
                    <th>学号</th>
                    <th>ISBN</th>
                    <th>借阅日期</th>
                    <th>操作</th>
                </tr>
                </thead>
                <%-- 表头 --%>

                <%-- 表身 --%>
                <tbody>
                <c:forEach var="loan" items="${list}">
                    <tr>
                        <td>${loan.sno}</td>
                        <td>${loan.ISBN}</td>
                        <td>${loan.borrowdate}</td>
                        <td>
                            <a href="${pageContext.request.contextPath}/loan/toUpdate?sno=${loan.sno}&ISBN=${loan.ISBN}">修改</a>
                            &nbsp; | &nbsp;
                            <a href="${pageContext.request.contextPath}/loan/deleteLoan?sno=${loan.sno}&ISBN=${loan.ISBN}">删除</a>
                        </td>
                    </tr>
                </c:forEach>
                </tbody>
                <%-- 表身 --%>

            </table>
        </div>
    </div>
    <%-- 表格展示区域 --%>

</div>
<%-- boostrap主容器 --%>
</body>
</html>
